﻿using Mrhd.Core.Entities;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Mrhd.Application
{
    /// <summary>
    /// 账户服务
    /// </summary>
    public interface IAccountService
    {
        /// <summary>
        /// 通过登录名获取用户信息
        /// </summary>
        /// <param name="username">用户名</param>
        /// <returns></returns>
        Task<UserEntity> GetUserByUserNameAsync(string username);
        /// <summary>
        /// 通过openid获取用户信息
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        Task<UserMobileEntity> GetUserByOpenIdAsync(string openid);
        /// <summary>
        /// 创建移动端新用户
        /// </summary>
        /// <param name="openid"></param>
        /// <returns></returns>
        Task<UserMobileEntity> CreateUserAsync(string openid);
    }
}
